<% @sub_groups = @group.child_groups %>
<%= simple_form_for [:admin, @group], :defaults => { :input_html => { :class => "form-control" } },  remote: true, html: {class: 'form-horizontal' } do |f| %>
	<fieldset>
		<legend><%= title %></legend>
	  <%= f.input :name, label: '名称' %>
	  <%= f.input :description, as: :text, label: '描述' %>
	  <%= f.input :category, collection: Group::CATEGORIES , label: '类别' %>
	  <%= f.association :subs, collection: @groups, checked: @sub_groups, label: '子组', :input_html => { class: "" } %>
	  <%= f.input :del, label: 'Del', as: :boolean, :input_html => { class: "" } %>
	  <%= f.button :wrapped, value: '提 交' %>
  </fieldset>
<% end %>
<%= javascript_tag do %>
 	$('#group_sub_ids').select2({width: "100%"});
<% end %>
<%= javascript_include_tag "prevent_label.js" %>